package com.dubbo.cp.provider.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.dubbo.cp.IService.RoleService;
import com.dubbo.cp.entity.RoleEntity;
import com.dubbo.cp.provider.mapper.RoleMapper;
@Service
public class RoleServiceImpl implements RoleService {

	
	@Autowired
	RoleMapper roleMapper;
	@Override
	public RoleEntity findRoleByRoleid(int id) {
		// TODO Auto-generated method stub
		return roleMapper.findRoleByRoleid(id);
	}

	@Override
	public void insertRoleEntity(RoleEntity roleEntity) {
		roleMapper.insertRoleEntity(roleEntity);

	}

	@Override
	public void deleteRoleEntity(int id) {
		roleMapper.deleteById(id);

	}

	@Override
	public RoleEntity findRoleByRole(String role) {
		
		return roleMapper.findRoleByRole(role);
	}

	@Override
	public List<RoleEntity> getRoleByPage(int start, int size) {
		
		return roleMapper.getRoleByPage(start, size);
	}

	@Override
	public List<RoleEntity> getRoleList() {
		
		return roleMapper.getRoleList();
	}

	@Override
	public void updateRoleEntity(RoleEntity roleEntity) {
		roleMapper.UpdateRoleEntity(roleEntity);

	}

}
